package com.iqiyi.pps.epg.api.server.impl;

import com.alibaba.fastjson.JSONObject;
import com.iqiyi.pps.epg.api.server.iservice.RecordColApiService;
import com.iqiyi.pps.epg.api.server.proxy.RecordColProxy;
import com.iqiyi.pps.epg.api.utils.CrossDataLocalPool;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.ws.rs.FormParam;

/**
 * Created by wangle on 2018/4/11.
 */
@Service("recordColApiServiceImpl")
public class RecordColApiServiceImpl extends ApiServiceImpl implements RecordColApiService {
    @Autowired
    private RecordColProxy recordColProxy;

    @Override
    public String saveRecordColData(String data) {
        CrossDataLocalPool.set(getCrossData());
        return recordColProxy.saveRecordColData(data);
    }

    @Override
    public String updateRecordColData(String data) {
        CrossDataLocalPool.set(getCrossData());
        return recordColProxy.updateRecordColData(data);
    }

    @Override
    public String getRecordColDataList(Integer pageSize, Integer pageNo, String paramsObj) {
        CrossDataLocalPool.set(getCrossData());
        return recordColProxy.getAutoNewDataList(pageSize, pageNo, paramsObj);
    }

    @Override
    public String getRecordColInfo(Long id) {
        CrossDataLocalPool.set(getCrossData());
        return recordColProxy.getRecordColInfo(id);
    }

    @Override
    public String deleteRecordColData(Long id) {
        CrossDataLocalPool.set(getCrossData());
        return recordColProxy.deleteRecordColData(id);
    }

    @Override
    public String authList(String name, String currentPage) {
        CrossDataLocalPool.set(getCrossData());
        return recordColProxy.authList(name, currentPage);
    }
}
